package com.xxgc.eow.service.impl;

import com.xxgc.eow.entity.Postask;
import com.xxgc.eow.mapper.PostaskMapper;
import com.xxgc.eow.service.IPostaskService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 职位要求表 服务实现类
 * </p>
 *
 * @author Mr.Abel
 * @since 2023-05-23
 */
@Service
public class PostaskServiceImpl extends ServiceImpl<PostaskMapper, Postask> implements IPostaskService {

    @Resource
    private PostaskMapper postaskMapper;
    @Override
    public int delPostAsk(Postask postask) {
        return postaskMapper.delectPostAsk(postask);
    }

    @Override
    public int addPostAsk(Postask postask) {
        return postaskMapper.insert(postask);
    }

    @Override
    public int updatPostAsk(Postask postask, int oldAskId) {
        return postaskMapper.updatPostAsk(postask,oldAskId);
    }



    @Override
    public List<Postask> getALlByPostId(int postId) {
        return postaskMapper.selectBypostId(postId);
    }

    @Override
    public List<Postask> getALl() {
        return postaskMapper.selectAll();
    }
}
